﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:InfoStrat.VE.NUI"
                    xmlns:s="http://schemas.microsoft.com/surface/2008"
                    xmlns:Interop="clr-namespace:System.Windows.Interop;assembly=PresentationCore">

    <Style TargetType="{x:Type local:ExpandingSurfaceVEPushPin}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:ExpandingSurfaceVEPushPin}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Width="{TemplateBinding Width}"
                            Height="{TemplateBinding Height}"
                            Margin="{TemplateBinding Margin}"
                            Padding="{TemplateBinding Padding}"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch">
                        <StackPanel>
                            <Border Background="{TemplateBinding PushPinBackground}"
                                    CornerRadius="6"
                                    Padding="0"
                                    Margin="0"
                                    BorderBrush="Black"
                                    BorderThickness="3"
                                    HorizontalAlignment="Center"
                                    SnapsToDevicePixels="True">
                                <s:SurfaceButton Name="PART_button"
                                                       Background="Transparent"
                                                       BorderThickness="0"
                                                       Margin="-2"
                                                       FontSize="12"
                                                       VerticalAlignment="Top"
                                                       HorizontalAlignment="Center">
                                    <StackPanel Name="PART_pnlContainer">
                                        <ContentPresenter Name="PART_cpContent"
                                                          Content="{TemplateBinding Content}" />
                                        <ContentPresenter Name="PART_cpDetails"
                                                          Visibility="Collapsed"
                                                          Content="{TemplateBinding Details}" />
                                    </StackPanel>
                                </s:SurfaceButton>
                            </Border>
                            <Grid>
                                <Polyline StrokeThickness="2"
                                          Stroke="Black"
                                          HorizontalAlignment="Center"
                                          VerticalAlignment="Top"
                                          Margin="0"
                                          Fill="{TemplateBinding PushPinBackground}">
                                    <Polyline.Points>
                                        <Point X="20"
                                               Y="0" />
                                        <Point X="10"
                                               Y="10" />
                                        <Point X="0"
                                               Y="0" />
                                    </Polyline.Points>
                                </Polyline>
                            </Grid>
                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>